package com.test.service.impl;

import com.test.dao.UserDao;
import com.test.service.UserService;

/**
 * @ClasName UserServiceImpl
 * @Descripution TODO
 * @Author USER
 * @Date 2022/2/28 16:19
 * @Version V1.0
 */
public class UserServiceImpl implements UserService {

    //声明一个UserDao类型的变量
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public UserServiceImpl() {
        System.out.println("userService被创建了");
    }

    @Override
    public void add() {
        System.out.println("UserService ...");
        userDao.add();
    }
}
